package com.yanqu.road.server.cmd.activity.liondance;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.LionDanceProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.liondance.CrossLionDanceActivityMgr;
import com.yanqu.road.server.manager.activity.liondance.LionDanceActivity;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_LION_DANCE_LIST_APPLY_CARD, desc = "申请列表（他人）")
public class CrossLionDanceFriendApplyListCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        LionDanceProto.CrossLionDanceFriendApplyListReqMsg reqMsg = LionDanceProto.CrossLionDanceFriendApplyListReqMsg.parseFrom(packet.getBytes());
        LionDanceActivity activity = CrossLionDanceActivityMgr.getLionDanceActivity(reqMsg.getActivityId());
        if(activity != null){
            activity.listOtherApply(packet.getPlayerId(), reqMsg.getPageNo(), reqMsg.getPageSize());
        }
    }

    @Override
    public void sendData() {

    }
}
